package com.fgba.express.data.search;

import com.fgba.express.comm.enums.State;
import com.fgba.express.core.search.BaseSearch;
import com.fgba.express.util.NullChecker;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 角色查询
 * </p>
 *
 * @author fgba
 * @since 2022-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "RoleSearch对象", description = "角色查询")
public class RoleSearch extends BaseSearch {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色名称")
    private String name;

    @ApiModelProperty(value = "角色代码")
    private String code;

    /**
     * 状态，0为删除，1为正常，2为禁用
     */
    @ApiModelProperty(value = "状态")
    private State state;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = NullChecker.isNullOrEmpty(name) ? null : name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = NullChecker.isNullOrEmpty(code) ? null : code;
    }
}
